home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmMain
- BackColor = &H80000004&
- Caption = "The Loader"
- ClientHeight = 5370
- ClientLeft = 165
- ClientTop = 735
- ClientWidth = 6915
- FillColor = &H00C0C0C0&
- Icon = "frm_Loader.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 5370
- ScaleWidth = 6915
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton cmdPropProg2
- Caption = "Properties"
- Height = 375
- Left = 120
- Style = 1 'Graphical
- TabIndex = 15
- Top = 2400
- Width = 1095
- End
- Begin VB.CommandButton cmdPropProg3
- Caption = "Properties"
- Height = 375
- Left = 120
- Style = 1 'Graphical
- TabIndex = 14
- Top = 3120
- Width = 1095
- End
- Begin VB.CommandButton cmdPropProg4
- Caption = "Properties"
- Height = 375
- Left = 120
- Style = 1 'Graphical
- TabIndex = 13
- Top = 3840
- Width = 1095
- End
- Begin VB.CommandButton cmdPropProg5
- Caption = "Properties"
- Height = 375
- Left = 120
- Style = 1 'Graphical
- TabIndex = 12
- Top = 4560
- Width = 1095
- End
- Begin VB.CommandButton cmdPropProg1
- Caption = "Properties"
- Height = 375
- Left = 120
- Style = 1 'Graphical
- TabIndex = 11
- Top = 1680
- Width = 1095
- End
- Begin VB.CommandButton cmdProg5
- Caption = "Program no. 5"
- Height = 615
- Left = 1440
- Style = 1 'Graphical
- TabIndex = 5
- Top = 4440
- Width = 1695
- End
- Begin VB.CommandButton cmdProg4
- Caption = "Program no. 4"
- Height = 615
- Left = 1440
- Style = 1 'Graphical
- TabIndex = 4
- Top = 3720
- Width = 1695
- End
- Begin VB.CommandButton cmdProg3
- Caption = "Program no. 3"
- Height = 615
- Left = 1440
- Style = 1 'Graphical
- TabIndex = 3
- Top = 3000
- Width = 1695
- End
- Begin VB.CommandButton cmdProg2
- Caption = "Program no. 2"
- Height = 615
- Left = 1440
- Style = 1 'Graphical
- TabIndex = 2
- Top = 2280
- Width = 1695
- End
- Begin VB.CommandButton cmdProg1
- Caption = "Program no. 1"
- Height = 615
- Left = 1440
- MaskColor = &H00808080&
- Style = 1 'Graphical
- TabIndex = 1
- Top = 1560
- Width = 1695
- End
- Begin VB.Label Label1
- Caption = " DIRECTORY PATH"
- BeginProperty Font
- Name = "Charlesworth"
- Size = 14.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 495
- Left = 3360
- TabIndex = 16
- Top = 960
- Width = 2895
- End
- Begin VB.Label lblDir5
- Height = 495
- Left = 3480
- TabIndex = 10
- Top = 4440
- Width = 2775
- End
- Begin VB.Label lblDir4
- Height = 495
- Left = 3480
- TabIndex = 9
- Top = 3720
- Width = 2775
- End
- Begin VB.Label lblDir3
- Height = 495
- Left = 3480
- TabIndex = 8
- Top = 3000
- Width = 2775
- End
- Begin VB.Label lblDir2
- Height = 375
- Left = 3480
- TabIndex = 7
- Top = 2400
- Width = 2775
- End
- Begin VB.Label lblDir1
- Height = 375
- Left = 3480
- TabIndex = 6
- Top = 1680
- Width = 2775
- End
- Begin VB.Label lblTitle
- Caption = "Welcome to ""THE LAUNCHER"""
- BeginProperty Font
- Name = "PosterBodoni BT"
- Size = 18
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C00000&
- Height = 615
- Left = 240
- TabIndex = 0
- Top = 120
- Width = 8775
- End
- Begin VB.Menu mnufile
- Caption = "&File"
- Begin VB.Menu mnuGoto
- Caption = "&Goto"
- Begin VB.Menu mnuProp1
- Caption = "Program &1 Properties"
- End
- Begin VB.Menu mnuProp2
- Caption = "Program &2 Properties"
- End
- Begin VB.Menu mnuProp3
- Caption = "Program &3 Properties"
- End
- Begin VB.Menu mnuProp4
- Caption = "Program &4 Properties"
- End
- Begin VB.Menu mnuProp5
- Caption = "Program &5 Properties"
- End
- End
- Begin VB.Menu mnuEnd
- Caption = "&End"
- Shortcut = ^{F4}
- End
- End
- Begin VB.Menu mnuHelp
- Caption = "&Help"
- Begin VB.Menu mnuAbout
- Caption = "&About"
- End
- Begin VB.Menu mnuBugs
- Caption = "&Known Bugs"
- End
- Begin VB.Menu mnutips
- Caption = "&Tips"
- End
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cmdProg1_Click()
- On Error GoTo error
- Dim directory1, program1 As String
- If lblDir1.Caption = "" Then
- MsgBox "I am sorry but you must specify a program. Select from the properties button!", vbExclamation, "Program error"
- ' this code executes the program specified by the user
- directory1 = lblDir1.Caption
- program1 = Shell(directory1, vbMaximizedFocus)
- End If
- Exit Sub
- error: MsgBox Err.Description, vbCritical, "An error has occured"
- End Sub
- Private Sub cmdProg2_Click()
- On Error GoTo error
- Dim directory2, program2 As String
- If lblDir2.Caption = "" Then
- MsgBox "I am sorry but you must specify a program. Select from the properties button!", vbExclamation, "Program error"
- ' this code executes the program specified by the user
- directory2 = lblDir2.Caption
- program2 = Shell(directory2, vbMaximizedFocus)
- End If
- Exit Sub
- error: MsgBox Err.Description, vbCritical, "An error has occured"
- End Sub
- Private Sub cmdProg3_Click()
- On Error GoTo error
- Dim directory3, program3 As String
- If lblDir3.Caption = "" Then
- MsgBox "I am sorry but you must specify a program. Select from the properties button!", vbExclamation, "Program error"
- ' this code executes the program specified by the user
- directory3 = lblDir3.Caption
- program3 = Shell(directory3, vbMaximizedFocus)
- End If
- Exit Sub
- error: MsgBox Err.Description, vbCritical, "An error has occured"
- End Sub
- Private Sub cmdProg4_Click()
- On Error GoTo error
- Dim directory4, program4 As String
- If lblDir4.Caption = "" Then
- MsgBox "I am sorry but you must specify a program. Select from the properties button!", vbExclamation, "Program error"
- ' this code executes the program specified by the user
- directory4 = lblDir4.Caption
- program4 = Shell(directory4, vbMaximizedFocus)
- End If
- Exit Sub
- error: MsgBox Err.Description, vbCritical, "An error has occured"
- End Sub
- Private Sub cmdProg5_Click()
- On Error GoTo error
- Dim directory5, program5 As String
- If lblDir5.Caption = "" Then
- MsgBox "I am sorry but you must specify a program. Select from the properties button!", vbExclamation, "Program error"
- ' this code executes the program specified by the user
- directory5 = lblDir5.Caption
- program5 = Shell(directory5, vbMaximizedFocus)
- End If
- Exit Sub
- error: MsgBox Err.Description, vbCritical, "An error has occured"
- End Sub
- Private Sub cmdPropProg1_Click()
- 'When clicked displays the form for the Properties
- frmPropertiesa.Visible = True ' allows the frmProperties to become visible
- End Sub
- Private Sub cmdPropProg2_Click()
- 'When clicked displays the form for the Properties
- frmPropertiesB.Visible = True ' allows the frmPropertiesb to become visible
- End Sub
- Private Sub cmdPropProg3_Click()
- frmPropertiesC.Visible = True ' allows the frmPropertiesc to become visible
- End Sub
- Private Sub cmdPropProg4_Click()
- frmPropertiesD.Visible = True ' allows the frmProperties to become visible
- End Sub
- Private Sub cmdPropProg5_Click()
- frmPropertiesE.Visible = True ' allows the frmProperties to become visible
- End Sub
- Private Sub Form_Load()
- 'On Error GoTo error
- ' this function loads the registery settings that have
- ' been made by the savesetting statement by the code
- ' implemented by the properties form
- ' the settings load the information into the command
- ' button as its caption ie. instead of saying unable
- ' to use it states the name of the program entered in by
- ' the user
- 'If lblDir1.Caption = "" Then
- 'cmdProg1.Enabled = False
- 'cmdProg1.Caption = "Unable to use"
- 'Else
- 'cmdProg1.Enabled = True
- cmdProg1.Caption = GetSetting("The Loader", "Caption name", "Text1 cmd")
- lblDir1.Caption = GetSetting("The Loader", "Label Dir1 text", "text1 lbl")
- cmdProg2.Caption = GetSetting("The Loader", "Caption2 name", "text2 cmd")
- lblDir2.Caption = GetSetting("The Loader", "Label Dir2 text", "text2 lbl")
- cmdProg3.Caption = GetSetting("The Loader", "Caption3 name", "text3 cmd")
- lblDir3.Caption = GetSetting("The Loader", "Label Dir3 text", "text3 lbl")
- cmdProg4.Caption = GetSetting("The Loader", "Caption4 name", "text4 cmd")
- lblDir4.Caption = GetSetting("The Loader", "Label Dir4 text", "text4 lbl")
- cmdProg5.Caption = GetSetting("The Loader", "Caption5 name", "text5 cmd")
- lblDir5.Caption = GetSetting("The Loader", "Label Dir5 text", "text5 lbl")
- 'End If
- 'error: MsgBox Err.Description, vbCritical, "An error has occured"
- ' this code fixes the registery bug
- ' -------------------------------------
- If cmdProg1.Caption = "" Then
- cmdProg1.Caption = "Program no. 1"
- End If
- If cmdProg2.Caption = "" Then
- cmdProg2.Caption = "Program no. 2"
- End If
- If cmdProg3.Caption = "" Then
- cmdProg3.Caption = "Program no. 3"
- End If
- If cmdProg4.Caption = "" Then
- cmdProg4.Caption = "Program no. 4"
- End If
- If cmdProg5.Caption = "" Then
- cmdProg5.Caption = "Program no. 5"
- End If
- '---------------------------------------
- End Sub
- Private Sub Form_QueryUnload(fCancel As Integer, UnloadMode As Integer)
- ' this queries the form into asking the user if they
- ' want to exit the program
- Dim response
- ' ----------------------------------------------------------------------
- response = MsgBox("Are you sure? (Y/N)", vbExclamation + vbYesNo)
- If (response = vbYes) Then
- fCancel = False
- End ' this lets the program know that it is being
- 'terminated
- Else
- fCancel = True
- End If
- ' ----------------------------------------------------------------------
- End Sub
- Private Sub Form_Terminate()
- End Sub
- Private Sub mnuAbout_Click()
- frmAbout.Visible = True
- End Sub
- Private Sub mnuBugs_Click()
- frmBugs.Visible = True
- End Sub
- Private Sub mnuEnd_Click()
- ' this queries the form into asking the user if they
- ' want to exit the program
- Dim response
- ' ----------------------------------------------------------------------
- response = MsgBox("Are you sure? (Y/N)", vbExclamation + vbYesNo)
- If response = vbYes Then
- End
- Unload Me
- End If
- ' ----------------------------------------------------------------------
- End Sub
- Private Sub mnuProp1_Click()
- Call cmdPropProg1_Click ' this code calls the events listed in cmdpropprog1_click() event
- End Sub
- Private Sub mnuProp2_Click()
- Call cmdPropProg2_Click
- End Sub
- Private Sub mnuProp3_Click()
- Call cmdPropProg3_Click
- End Sub
- Private Sub mnuProp4_Click()
- Call cmdPropProg4_Click
- End Sub
- Private Sub mnuProp5_Click()
- Call cmdPropProg5_Click
- End Sub
- Private Sub mnutips_Click()
- frmTip.Visible = True
- End Sub
-